/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapping/{{entities}}InheritMapping.java.hbs
 */
package cn.ibizlab.core.system.mapping;

import org.mapstruct.*;
import cn.ibizlab.core.system.domain.SysComponent;
import cn.ibizlab.core.system.domain.SysPermission;
import java.util.List;

/**
 * 组件继承映射[SysComponent]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {})
public interface SysComponentInheritMapping {

    /**
     * 转换SysPermission
     * 
     * @param sysComponent
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="id",target = "id"),
            @Mapping(source ="displayName",target = "displayName"),
            @Mapping(source ="parentId",target = "parentId"),
    })
    SysPermission toSysPermission(SysComponent sysComponent);

    /**
     * 转换SysPermission
     * 
     * @param sysPermission
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="id",target = "id"),
            @Mapping(source ="displayName",target = "displayName"),
            @Mapping(source ="parentId",target = "parentId"),
    })
    SysComponent toSysComponent(SysPermission sysPermission);

    /**
     * List SysComponent 对象转换
     *
     * @param list
     * @return
     */
    List<SysPermission> toSysPermission(List<SysComponent> list);

    /**
     * List SysPermission 对象转换
     *
     * @param list
     * @return
     */
    List<SysComponent> toSysComponent(List<SysPermission> list);

}
